package com.zzh;


import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.zzh.dialog.R;
import com.zzh.lib.views.fb.AnswerRange;
import com.zzh.lib.views.fb.FillBlankView;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by zzh on 2025/1/9.
 *
 * @date: 2025/1/9 15:58
 * @email: zzh_hz@126.com
 * @author: zzh
 * @description: com.zzh
 */
public class FillBlankActivity extends AppCompatActivity {
    FillBlankView fbvContent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.h_act_main);
        fbvContent = findViewById(R.id.fbv_content);
        initData();
    }

    private void initData() {
        String content = "纷纷扬扬的________下了半尺多厚。天地间________的一片。我顺着________工地走了四十多公里，" +
                "只听见各种机器的吼声，可是看不见人影，也看不见工点。一进灵官峡，我就心里发慌。";

        // 答案范围集合
        List<AnswerRange> rangeList = new ArrayList<>();
        rangeList.add(new AnswerRange(5, 13));
        rangeList.add(new AnswerRange(23, 31));
        rangeList.add(new AnswerRange(38, 46));

        fbvContent.setData(content, rangeList);
    }
}
